package com.yonyou.cyxdms.sysAuth.service.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 菜单操作权限
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
@TableName("tc_default_action")
public class DefaultActionPO extends DMSBasePO<DefaultActionPO> {

    private static final long serialVersionUID = 1L;

    /**
     * MENU_CURING_ID
     */
        @TableId(value = "DEFAULT_ACTION_ID", type = IdType.AUTO)
        private Integer defaultActionId;
    /**
     * 操作代码
     */
    @TableField("ACTION_CODE")
    private String actionCode;
    /**
     * 操作名称
     */
    @TableField("ACTION_NAME")
    private String actionName;
    /**
     * 模块
     */
    @TableField("MODULE")
    private String module;
    /**
     * 是，否启用权限控制
     */
    @TableField("ACTION_CTL")
    private Integer actionCtl;
    /**
     * 操作方法
     */
    @TableField("ACTION_METHOD")
    private String actionMethod;
    /**
     * 描述
     */
    @TableField("DESCRIPTION")
    private String description;
    /**
     * 开发人员
     */
    @TableField("OWNER")
    private String owner;
    /**
     * 是否必须登录
     */
    @TableField("is_need_login")
    private Integer isNeedLogin;
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;

    public DefaultActionPO() {
        super();
    }


    public Integer getDefaultActionId() {
        return defaultActionId;
    }

    public void setDefaultActionId(Integer defaultActionId) {
        this.defaultActionId = defaultActionId;
    }

    public String getActionCode() {
        return actionCode;
    }

    public void setActionCode(String actionCode) {
        this.actionCode = actionCode;
    }

    public String getActionName() {
        return actionName;
    }

    public void setActionName(String actionName) {
        this.actionName = actionName;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public Integer getActionCtl() {
        return actionCtl;
    }

    public void setActionCtl(Integer actionCtl) {
        this.actionCtl = actionCtl;
    }

    public String getActionMethod() {
        return actionMethod;
    }

    public void setActionMethod(String actionMethod) {
        this.actionMethod = actionMethod;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public Integer getIsNeedLogin() {
        return isNeedLogin;
    }

    public void setIsNeedLogin(Integer isNeedLogin) {
        this.isNeedLogin = isNeedLogin;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.defaultActionId;
    }

    @Override
    public String toString() {
        return "DefaultActionPO{" +
        "defaultActionId=" + defaultActionId +
        ", actionCode=" + actionCode +
        ", actionName=" + actionName +
        ", module=" + module +
        ", actionCtl=" + actionCtl +
        ", actionMethod=" + actionMethod +
        ", description=" + description +
        ", owner=" + owner +
        ", isNeedLogin=" + isNeedLogin +
        ", isDeleted=" + isDeleted +
        "}";
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "defaultActionId");
    }


}
